{include file="public_head" /}

<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">


<body class="nav-md">

<div class="container body">

    <div class="main_container">

        {include file="public_sidebar,public_nav" /}
        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">

                <div class="page-title">
                    <div class="title_left">
                        <h3>用户规则管理</h3>
                    </div>
                </div>
                <div class="clearfix"></div>
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>{$mate_title}
                                    <!--<small>different form elements</small>-->
                                </h2>
                                <ul class="nav navbar-right panel_toolbox">
                                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                    </li>
                                    <li><a class="close-link"><i class="fa fa-close"></i></a>
                                    </li>
                                </ul>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <br/>
                                <form class="form-horizontal form-label-left" action="" method="post" id="registerForm">

                                    <!--<div class="form-group">-->
                                        <!--<label class="control-label col-md-3 col-sm-3 col-xs-12">规则所属模块：</label>-->
                                        <!--<div class="col-md-6 col-sm-6 col-xs-12">-->
                                            <!--<input type="text" placeholder="规则所属模块 例：Dashboard or Manager or Member"-->
                                                   <!--class="form-control col-md-7 col-xs-12" name="module"-->
                                                   <!--value="{$item.module|default=''}"-->
                                                   <!--datatype="*"-->
                                                   <!--nullmsg="请填写规则所属模块！" errormsg="请填写规则所属模块！"-->
                                            <!--&gt;-->
                                        <!--</div>-->
                                    <!--</div>-->

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">规则栏目：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <select name="parenTid" class="select2_single"
                                                    style="width: 500px;" tabindex="-1"
                                                    datatype="*"
                                                    nullmsg="请选择规则栏目！" errormsg="请选择规则栏目！"
                                            >
                                                <option
                                                        value="0"

                                                >
                                                一级栏目
                                                </option>
                                                {volist name="rule_list" id="list"}
                                                <option
                                                        {eq name='list.id' value='$item.parenTid|default=""'}selected{/eq}
                                                {eq name='list.id' value='$item.id|default=""'}disabled{/eq}

                                                value="{$list.id}"

                                                >
                                                {neq name="list.parenTid" value="0"}
                                                {:str_repeat('　',$list['count'])}
                                                {/neq}
                                                {eq name="item.parenTid|default=''" value="0"}
                                                <span>&nbsp;</span>
                                                {else /}
                                                <span>&nbsp;</span>
                                                {/eq}
                                                {neq name="list.count" value="1"}|&nbsp;--&nbsp;{/neq}
                                                {$list.title}
                                                </option>
                                                {/volist}
                                            </select>
                                        </div>
                                    </div>

                                    <div class="divider-dashed"></div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">规则中文名称：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input type="text" placeholder="规则中文名称 例：列表 or 添加 or 编辑"
                                                   class="form-control col-md-7 col-xs-12" name="title"
                                                   value="{$item.title|default=''}"
                                                   datatype="*"
                                                   nullmsg="请填写规则中文名称！" errormsg="请填写规则中文名称！"
                                            >
                                        </div>
                                    </div>

                                    <div class="divider-dashed"></div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">规则正则表达：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input type="text" placeholder="规则正则表达 例：console/Dashboard/index"
                                                   class="form-control col-md-7 col-xs-12" name="name"
                                                   value="{$item.name|default=''}"
                                                   datatype="*"
                                                   nullmsg="请填写规则正则表达！" errormsg="请填写规则正则表达！"
                                            >
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">图标：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input type="text" placeholder="图标"
                                                   class="form-control col-md-7 col-xs-12" name="icon"
                                                   value="{$item.icon|default=''}"


                                            >
                                        </div>
                                    </div>
                                    <div class="divider-dashed"></div>

                                    <!--<div class="form-group">-->
                                        <!--<label class="control-label col-md-3 col-sm-3 col-xs-12">规则状态：</label>-->
                                        <!--<div class="col-md-6 col-sm-6 col-xs-12">-->
                                            <!--<label class="radio_box">-->
                                                <!--<input type="radio" name="status" id="status_1" class="cartradio"-->
                                                       <!--value="1"-->
                                                       <!--datatype="*"-->
                                                       <!--nullmsg="请选择规则状态！" errormsg="请选择规则状态！"-->
                                                       <!--{eq name='item.status|default=""' value='1' }-->
                                                       <!--checked-->
                                                       <!--{/eq}-->
                                                <!--&gt;&nbsp;&nbsp;-->
                                                <!--<label for="status_1"></label>-->
                                                <!--<span>启用</span>-->
                                                <!--&nbsp;&nbsp;-->
                                            <!--</label>-->
                                            <!--<label class="radio_box">-->
                                                <!--<input type="radio" name="status" id="status_2" class="cartradio"-->
                                                       <!--value="0"-->
                                                       <!--datatype="*"-->
                                                       <!--nullmsg="请选择规则状态！" errormsg="请选择规则状态！"-->
                                                       <!--{eq name='item.status|default=""' value='0' }-->
                                                       <!--checked-->
                                                       <!--{/eq}-->
                                                <!--&gt;&nbsp;&nbsp;-->
                                                <!--<label for="status_2"></label>-->
                                                <!--<span>禁用</span>-->
                                                <!--&nbsp;&nbsp;-->
                                            <!--</label>-->
                                        <!--</div>-->
                                    <!--</div>-->

                                    <!--<div class="divider-dashed"></div>-->

                                    <!--<div class="form-group">-->
                                        <!--<label class="control-label col-md-3 col-sm-3 col-xs-12">规则类型：</label>-->
                                        <!--<div class="col-md-6 col-sm-6 col-xs-12">-->
                                            <!--<label class="radio_box">-->
                                                <!--<input type="radio" name="type" id="type_1" class="cartradio"-->
                                                       <!--value="1"-->
                                                       <!--datatype="*"-->
                                                       <!--nullmsg="请选择规则类型！" errormsg="请选择规则类型！"-->
                                                       <!--{eq name='item.type|default=""' value='1' }-->
                                                       <!--checked-->
                                                       <!--{/eq}-->
                                                <!--&gt;&nbsp;&nbsp;-->
                                                <!--<label for="type_1"></label>-->
                                                <!--<span>URL模式</span>-->
                                                <!--&nbsp;&nbsp;-->
                                            <!--</label>-->
                                            <!--<label class="radio_box">-->
                                                <!--<input type="radio" name="type" id="type_2" class="cartradio"-->
                                                       <!--value="2"-->
                                                       <!--datatype="*"-->
                                                       <!--nullmsg="请选择规则类型！" errormsg="请选择规则类型！"-->
                                                       <!--{eq name='item.type|default=""' value='2' }-->
                                                       <!--checked-->
                                                       <!--{/eq}-->
                                                <!--&gt;&nbsp;&nbsp;-->
                                                <!--<label for="type_2"></label>-->
                                                <!--<span>主菜单模式</span>-->
                                                <!--&nbsp;&nbsp;-->
                                            <!--</label>-->
                                        <!--</div>-->
                                    <!--</div>-->

                                    <!--<div class="ln_solid"></div>-->

                                    <div class="form-group">
                                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                            {present name="$item.id"}
                                            <input type="hidden" name="id" value="{$item.id}">
                                            <input type="hidden" name="repId" id="repId" value="{$item.parenTid}" />
                                            {/present}
                                            <button type="submit" class="btn btn-primary">提交</button>
                                            <a type="reset" class="btn btn-success" onclick="history.go(-1)">返回</a>
                                        </div>
                                    </div>

                                </form>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
            <!-- /page content -->

        </div>

    </div>
</div>

{include file="public_foot" /}

<!-- Datatables-->
<script src="__STATIC__/js/datatables/jquery.dataTables.min.js"></script>
<script src="__STATIC__/js/datatables/dataTables.bootstrap.js"></script>
<!-- Times -->
<script src='__STATIC__/js/datepicker/WdatePicker.js'></script>
<!-- validform -->
<script src="__STATIC__/js/Validform_v5.3.2_min.js"></script>
<script src="__STATIC__/js/layer.js"></script>
<!--select-->
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<script>
    //validform
    $(function () {

        $.Tipmsg.r = null;

        var showmsg = function (msg) {
            //假定你的信息提示方法为showmsg， 在方法里可以接收参数msg，当然也可以接收到o及cssctl;
            alert(msg);
        }
        $("#registerForm").Validform({
            tiptype: function (msg) {
                layer.msg(msg);
            },
            tipSweep: true
        });


        // select2
        $(".select2_single").select2({
            placeholder: "请选择分类",
            allowClear: true
        });
    })
</script>
</body>

</html>
